package com.njuse_czf.kg;

import com.njuse_czf.kg.web.request.QuestionQuery;
import com.njuse_czf.kg.web.service.impl.QuestionServiceImpl;

import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
public class ProvideQuestionHandler {
    @Autowired
    private QuestionServiceImpl questionService;

    private static QuestionQuery query;

    @BeforeAll
    public static void init(){
        query = new QuestionQuery();
        query.setDomain("reddit_1127");
    }

    @Test
    public void regixOneTest(){
        String question1 = "what's required for java?";
        String question2 = "What is required for kotlin?";
        String answer = "";

        query.setQuestion(question1);
        answer = questionService.answer(query);
        System.out.println(answer);


        query.setQuestion(question2);
        answer = questionService.answer(query);
        System.out.println(answer);
    }
}
